1. Field of the Invention
The present invention relates to a method for generating a gain of an image frame, especially to a method for generating a gain of an image frame according to the luminance sensitivity of human eyes.
2. Description of the Prior Art
When a person watches an object, his visual system is analyzing chrominance and luminance at the same time. However, his analyses may be affected by the ambient environment. For example, when the person is in a bright environment, his visual system is sensitive to the chrominance of the object, yet insensitive to the luminance of the object. On the contrary, when a person is in a dark environment, his visual system is sensitive to the luminance of the object, yet insensitive to the chrominance of the object. That is, when the person is in a bright environment, his ability to analyze colors is better than his ability to analyze brightness; contrarily, when in a dark environment, his ability to analyze brightness is better than his ability to analyze colors. Please refer to FIG. 1. FIG. 1 illustrates three different luminance sensitivity curves of three different human eyes. The vertical axis in FIG. 1 represents the luminance of an image frame (unit: cd/(m^2)), and the horizontal axis in FIG. 1 represents the gray levels the human eyes sense (unit: LSB, Least Significant Bit). According to FIG. 1, when the luminance of the image frame changes from 0 to 50 cd/(m^2), the gray level the first eye senses changes from 1 to 111 (a difference of 100), and the gray level the third eye senses changes from 1 to 151 (a difference of 150). When the luminance of the image frame changes from 150 to 200 cd/(m^2), the gray level the first eye senses changes from 201 to 231 (a difference of 30), and the gray level the third eye senses changes from 221 to 241 (a difference of 20). Therefore FIG. 1 indicates that the human eyes are more sensitive to the luminance of the image frame when the luminance of the image frame is low, and less sensitive to the luminance of the image frame when the luminance of the image frame is high.
The CMOS image sensors which are widely used in optical devices have a problem of fixed pattern noise (FPN). The FPN is caused by differences between parameters of the optical device. Please refer to FIG. 2. FIG. 2 is an image with FPN equal to 2.41%. From FIG. 2, it can be seen that the potential difference resulted by FPN causes differences in brightness rather than in colors in columns and rows of an image frame.
Before an optical device such as a digital camera takes a picture, it has to perform focusing and light-metering for determining the gain of the image to be taken. Some cameras are even provided with an additional light-metering area for measuring the luminance of the scene. An image display such as an LCD TV usually has to display a test image frame and measure the luminance of the test image frame so as to determine the gain of the main image frame before the main image frame is displayed. After the gain is determined, the main image frame is displayed according to the gain. In order to determine the gain of the main image frame of a camera or an LCD TV, a test image frame or a light-metering area has to be spared. Therefore, both methods are not economical and efficient; moreover, the test image frame used for light-metering isn't the main image frame. As a result, this method is neither real-time nor efficient.
After light-metering, determine a corresponding gain from a look up table and use the gain to take a picture or display a main image frame. Conventionally the look up table of gain corresponds to an operation mode of the optical device, and is set up according to a mathematical average method. However, the luminance sensitivity of human eyes hasn't been considered when setting up the look up table. As a result, the look up table cannot provide a gain optimized for the environment, particularly when the ambient environment is extremely dark or bright, the gain provided by the look up table would be highly inappropriate.